

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'agenteIntegracao.label', default: 'AgenteIntegracao')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"></span>
            <span class="menuButton">
              <%
                if (agenteIntegracaoInstanceTotal == 0) {
              %>
                <g:link class="create" action="create">Incluir Agente de Integração</g:link>
              <%
                }
              %>
            </span>
        </div>
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" /></h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                            <g:sortableColumn property="nome" title="${message(code: 'agenteIntegracao.nome.label', default: 'Nome')}" />
                            <g:sortableColumn property="razaoSocial" title="${message(code: 'agenteIntegracao.razaoSocial.label', default: 'Razão Social')}" />
                            <g:sortableColumn property="cnpjCpf" title="${message(code: 'agenteIntegracao.cnpjCpf.label', default: 'CNPJ')}" />
                            <g:sortableColumn property="contato" title="${message(code: 'agenteIntegracao.contato.label', default: 'Contato')}" />
                            <td colspan="2" class="acao">Ações</td>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${agenteIntegracaoInstanceList}" status="i" var="agenteIntegracaoInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td>${fieldValue(bean: agenteIntegracaoInstance, field: "nome")}</td>
                            <td>${fieldValue(bean: agenteIntegracaoInstance, field: "razaoSocial")}</td>
                            <td>${fieldValue(bean: agenteIntegracaoInstance, field: "cnpjCpf")}</td>
                            <td>${fieldValue(bean: agenteIntegracaoInstance, field: "contato")}</td>
                            <td class="ico">
                                <a href="${createLink(uri: '/agenteIntegracao/edit/' + agenteIntegracaoInstance.id)}">
                                  <img src="${resource(dir:'images',file:'ico_edit.png')}" alt="Editar Item" title="Editar Item" />
                                </a>
                            </td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${agenteIntegracaoInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
